<template>
	<view class="content">
		<u-navbar back-text="" slot="center" @leftClick="navIndex()" safeAreaInsetTop placeholder>
			<view slot="center" class="leftText">找活详情</view>
		</u-navbar>
		<view class="center">
			<view class="row-box">
					<view class="contacts">
						<view class="info">
							<view class="top">
								<view class="contacts_name" @click="userJob=true">
									<view class="name">{{orderinfo.nickName}}</view>
									<block v-if="orderinfo.isRealName == 1">
										<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/user-real.svg" />
										<view class="authMe">实名认证</view>
									</block>
								</view>
								<!-- <view class="follow" v-if="isguanzhu == false && orderinfo.pay == 0" @click="guanzhu">关注</view>
								<view class="follow" v-if="isguanzhu == true && orderinfo.pay == 1" @click="noguanzhu">已关注</view> -->
								<block v-if="myUserid != orderinfo.userId">
									<view class="follow" v-if="isguanzhu == false" @click="guanzhu">关注</view>
									<view class="follow" v-if="isguanzhu == true" @click="noguanzhu">已关注</view>
								</block>
							</view>
							<view class="addr">
								<view><u-icon name="map" color="#A1A1A1" size="13"></u-icon>
								{{orderinfo.address?cutstr(orderinfo.address,10):'未定位地址'}} · {{timesNesd(orderinfo.createTime)}}</view>
								<view v-if="isguanzhu == false">关注此人及时获得新职位发布</view>
							</view>
						</view>
					</view>
		    </view>
			<view class="jobinfo row-box">	
				<view class="title dis-row poser">
				 <!--   <text class="tips" v-if="orderinfo.type == 1">置顶</text>
				    <view>{{orderinfo.title}}</view> -->
					<text class="tips" v-if="orderinfo.type == 1">置顶</text>
					  <block v-if="orderinfo.type == 1">
						  <view v-if="orderinfo.title" style="text-indent: 2.1em;">{{strHandle(orderinfo.title)}}</view>
					  </block>
					  <block v-if="orderinfo.type == 0">
					  	<view v-if="orderinfo.title" >{{strHandle(orderinfo.title)}}</view>
					  </block>
				</view>
				<view class="tag" v-if="orderinfo.welfares && orderinfo.welfares.length>0">
				    <!-- <view class="t1">{{orderinfo.settlementStr}}</view> -->
				    <view v-for="(stritem,strindex) in orderinfo.welfares" :key="strindex">{{stritem}}</view>
				<!--    <view>包吃包住 </view>
				    <view>高温补贴 </view>
				    <view>医疗保险 </view> -->
				</view>
				<view class="work_type" v-for="(item, index) in orderinfo.itemList" :key="index">
					<view class="top">
						<view class="work_type_name">
							<view v-if="item.skillName">{{item.skillName}}</view>
							<view v-if="item.composition">{{item.composition}}</view>
						</view>
						<view class="status" v-if="item.isFinished==1">已招满</view>
					</view>
					<view class="bottom">
						<view v-if="item.personNum">{{item.personNum}}人</view>
						<view v-if="item.settlementType">{{item.settlementType}}</view>
						<view v-if="item.salaryUnit" class="t1">{{item.salaryUnit}}</view>
						<view v-if="item.timeLimit">{{item.timeLimit}}</view>
						<view v-if="item.ageReq">{{item.ageReq}}</view>
					</view>
				</view>
				<view class="jobintroduction">
					<view class="title">职位描述</view>
					<view class="tag">
						<view v-for="(s,i) in orderinfo.jobReqs" :key="i">{{s}}</view>
						<!-- <view>平台实名</view>
						<view>个人</view>
						<view>持证</view> -->
					</view>
					<view class="xinzei dis-clm" style="font-size: 28rpx;color: #424242;line-height: 32rpx;">
					<!-- 	<label>薪资待遇:</label> -->
						<view class="xinzi-info" v-html="orderinfo.workDesc">
							
						</view>
					</view>
					<view class="imageslist">
						<view v-for="(k,v) in orderinfo.urlList" :key="v">
							<image mode="aspectFill" :src="k.url" @click="previewImg(v)"></image>
						</view>
						<!-- <view><image mode="widthFix" src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/bg.png"></image></view>
						<view><image mode="widthFix" src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/bg.png"></image></view>
						<view><image mode="widthFix" src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/bg.png"></image></view> -->
					</view>
					<view class="company">
						<block v-if="orderinfo.isEnterprice ==1 && orderinfo.enidentity">
							<view class="title" @click="navComNew('qiye')" >
								<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/comp-real.svg" style="width: 48rpx;height: 48rpx;" />
								<view class="name">{{orderinfo.enterPriseName?orderinfo.enterPriseName:'陕西新工建筑工程有限公司'}}<view class="dis-row">在招信息<label style="font-size: 24rpx;color: #0575FF;">{{orderinfo.num}}</label>个</view></view>
								<view class="right">
									<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/chevron-right5.svg"></image>
								</view>
							</view>
						</block>
						<block v-else>
							<view class="title" @click="navComNew('geren')">
								<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/user-real.svg" style="width: 48rpx;height: 48rpx;"/>
								<view class="name">{{orderinfo.nickName?orderinfo.nickName:'天下工人'}}<view class="dis-row">在招信息<label style="font-size: 24rpx;color: #0575FF;">{{orderinfo.num}}</label>个</view></view>
								<view class="right">
									<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/chevron-right5.svg"></image>
								</view>
							</view>
						</block>
					<!-- 	</navigator> -->
						<view class="map">
							<map id="map" :markers="markers" :include-points="markers" class="map"  style="width: 100%;height: 264rpx;" :latitude="orderinfo.lat" :longitude="orderinfo.lon" 
							  :scale="10">
							 <!--    <cover-view v-if="isshowmap == false">
								   <cover-view v-for="(m,n) in markers" :key="n" @click="openLoation(orderinfo.lat,orderinfo.lon,markers[0].address)">
									   <cover-view  class="customCallout dis-clm">
										   <cover-view class="marktop">{{m.address}}</cover-view >
									   </cover-view>
								   </cover-view>
								  </cover-view> -->
								  
								  <view v-if="isshowmap == false">
								    <view v-for="(m,n) in markers" :key="n" @click="openLoation(orderinfo.lat,orderinfo.lon,markers[0].address)">
									   <view  class="customCallout dis-clm">
										   <view class="marktop">{{m.address}}</view >
									   </view>
								    </view>
								   </view> 
							</map>
						</view>
					</view>
					<!-- <view style="width:100%;position:relative;">
					 <official-account style="position:absolute;top:0;background-color:red;width:81%;height:168rpx;font-size:50rpx;overflow:hidden;border:1rpx solid black;"></official-account>
					</view> -->
					<view class="contact_comp">
						<view class="left" @click="addweixin">
							<view>添加微信号，拉您进找活群</view>
							<view>加入群聊</view>
						</view>
						<view class="right" @click="weixinshares('./weixinshare')">
							<view>关注天下工人公众号及时获得招工找活提醒</view>
							<view>点击关注</view>
						</view>
					</view>
				</view>
			</view>
			<!--安全-->
			<view class="securityTips dis-row">
				<image src="../../static/img/anquan.png" style="width: 48rpx;height: 48rpx;"></image><view>安全提示</view><view>该信息由用户发布，请注意保护个人隐私</view>
			</view>
			<view class="similar row-box">相似</view>	
			
		</view>
		<view class="index">
			<scroll-view scroll-y="true" class="scroll-Y">
			  <view class="list" v-for="(rowitem,rowindex) in toporderlist" :key="rowindex">
			    <view class="title dis-row poser" @click="NavTaskInfo(rowitem)">
			      <!-- <text class="tips">置顶</text>
			      <view>{{rowitem.address}}、{{rowitem.skills}}</view> -->
					  <text class="tips" v-if="rowitem.type == 1">置顶</text>
					  <!--   <view>{{rowitem.address}}招{{rowitem.skills}}</view> -->
						<view v-if="rowitem.titleName">{{cutstr(rowitem.titleName,65)}}</view>
			    </view>
			     <view class="cont" v-if="rowitem.workDesc">{{rowitem.workDesc}}</view>
			   <view class="tag" @click="NavTaskInfo(rowitem)">
			      <view class="t1" v-if="rowitem.salaryStr">{{rowitem.salaryStr}}</view>
			      <view v-if="rowitem.settlementStr">{{rowitem.settlementStr}}</view>
			     <block v-if="rowitem.welfareNew"><view v-for="(childitem,childindex) in rowitem.welfareNew">{{childitem}}</view></block>
			   <!--   <view>高温补贴 </view>
			      <view>医疗保险 </view> -->
			    </view>
			   <view class="info">
			     <view class="left">
			       <view class="top">
			         <view class="name">{{rowitem.nickName}}</view>
			         
			   	  <block v-if="rowitem.isEnterPrise == 0 && rowitem.isRealName == 1">
			   		  <image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/user-real.svg" />
			   		  <view class="authMe" v-if="">实名认证</view>
			   	  </block>
			         <block v-if="rowitem.isEnterPrise == 1 && rowitem.isRealName == 1">
			   		  <image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/comp-real.svg" />
			   		  <view class="comp">企业认证</view>
			   	  </block>
			       </view>
			       <view class="addr">
			         <u-icon name="map" color="#A1A1A1" size="13"></u-icon>
			         {{rowitem.cityId}} · {{rowitem.createTime}}
			       </view>
			     </view>
			      <view class="right">
			       <!-- <view class="t2">已发名片</view> -->
			        <view class="btn" @click="NavTaskInfo(rowitem)">立即联系</view>
			      </view>
			    </view>
			  </view>
			
			</scroll-view>
		</view>
		<uTabbarinfo  :value="0" :orderObj="orderinfo" :isPublish="orderinfo.isPublish?orderinfo.isPublish:0" :collect="orderinfo.collect?orderinfo.collect:0"></uTabbarinfo>
		<u-popup :show="telTips" :round="10" bgColor="transparent" :overlay="false" 
		customStyle="background:rgba(0,0,0,0.7); color:#fff;" mode="center" @close="close" @open="open">
			<view class="telTips">
				<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/swap1.png"></image>
				<view>当前招工方休息</view>
				<view>请在下午14:00-18:00拨打电话联系</view>
			</view>
		</u-popup>
		<u-popup 
			:show="fraction" 
			:round="10" 
			customStyle="width:90%;" 
			mode="center" 
			:closeable="true" 
			@close="closeFraction"
			@open="openFraction"
			>
			<view class="fraction">
				<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/icon/gf.svg"></image>
				<view>工分不足，请前往获取工分</view>
				<u-button type="primary" customStyle="background:#0575FF; font-size:32rpx; margin-bottom: 24rpx;" text="前往获取"></u-button>
				<u-button type="info" customStyle="font-size:32rpx;"  text="取消"></u-button>
			</view>
		</u-popup>
		<u-popup
			:show="userJob" 
			:round="10" 
			customStyle="width:100%;" 
			overlayOpacity="0.8"
			mode="bottom"
			:closeable="true" 
			@close="closeJob" 
			@open="openJob"
			>
			<view class="userJobList">
				<view class="top">
					<view class="user">
						<block v-if="orderinfo.isRealName==1">
						    <image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/user-real.svg" style="width: 48rpx;height: 48rpx;" />
						</block>
						<view>{{orderinfo.nickName}}的招工</view>
					</view>
					<view class="number">在招信息<text>{{userListOrder.length>0?userListOrder.length:0}}</text>个</view>
				</view>
				<scroll-view scroll-y="true" sty class="scroll-Y">
						<view class="list" v-for="(jitem,jindex) in userListOrder" :key="jindex" >
							<view class="title"  @click="navUserOrderInfo(jitem)">
							<!-- 	<text class="tips">置顶</text> -->
								<view style="width: 100%;text-align: left;">{{cutstr(jitem.titleName,63)}}</view>
						    </view>
						  <view class="cont"
							>{{jitem.workDesc}}</view
						  >
						  <view class="tag"  @click="navUserOrderInfo(jitem)">
							<view class="t1" v-if="jitem.salaryStr!=''">{{jitem.salaryStr}}</view>
							<view v-if="jitem.settlementStr!=''">{{jitem.settlementStr}}</view>
							<block v-if="jitem.welfareNew">
								<block v-for="(childitem,childindex) in jitem.welfareNew" :key="childindex">
									<view v-if="childitem">{{childitem}}</view>
								</block>
							</block>
						  </view>
						  <view class="info">
							<view class="left">
							  <view class="addr">
								<u-icon name="map" color="#A1A1A1" size="13"></u-icon>
								 {{jitem.cityArea}} ·{{jitem.createTime}}
							  </view>
							</view>
							<view class="right" @click="navUserOrderInfo(jitem)">查看详情</view>
						  </view>
						</view>
						
				</scroll-view>
			</view>
		</u-popup>
		
		<!--企业信息列表-->
		<u-popup
			:show="workershow" 
			:round="10" 
			customStyle="width:100%;" 
			overlayOpacity="0.8"
			mode="bottom"
			:closeable="true" 
			@close="qiyecloseJob" 
			@open="qiyeopenJob"
			>
			<view class="userJobList">
				<view class="top">
					<view class="user">
						<block v-if="orderinfo.isEnterprice==1">
						    <image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/comp-real.svg" style="width: 48rpx;height: 48rpx;" />
						</block>
						<view>{{orderinfo.enterPriseName}}的招工</view>
					</view>
					<view class="number" v-if="orderinfo.isEnterprice==1" style="margin-left: 50rpx;">在招信息<text>{{userListOrder.length>0?userListOrder.length:0}}</text>个</view>
					<view class="number"  v-if="orderinfo.isEnterprice!=1" style="margin-left: 16rpx;">在招信息<text>{{userListOrder.length>0?userListOrder.length:0}}</text>个</view>
				</view>
				<scroll-view scroll-y="true" sty class="scroll-Y">
						<view class="list" v-for="(rowitem,rowindex) in workerListRow" :key="rowindex" >
							<view class="title"  @click="navUserOrderInfo(rowitem)">
								<view style="width: 100%;text-align: left;">{{cutstr(rowitem.titleName,63)}}</view>
						    </view>
						  <view class="cont">{{cutstr(rowitem.workDesc,96)}}</view>
						  <view class="tag"  @click="navUserOrderInfo(rowitem)">
							<view class="t1" v-if="rowitem.salaryStr">{{rowitem.salaryStr}}</view>
							<view v-if="rowitem.settlementStr">{{rowitem.settlementStr}}</view>
						  <block v-if="rowitem.welfareNew">
							  <block v-for="(childitem,childindex) in rowitem.welfareNew" :key="childindex">
							   <view v-if="childitem">{{childitem}}</view>
							   </block>
						</block>
						  </view>
						  <view class="info">
							<view class="left">
							  <view class="addr">
								<u-icon name="map" color="#A1A1A1" size="13"></u-icon>
								 {{rowitem.cityArea}} ·{{rowitem.createTime}}
							  </view>
							</view>
							<view class="right" @click="navUserOrderInfo(rowitem)">查看详情</view>
						  </view>
						</view>
						
				</scroll-view>
			</view>
		</u-popup>
		
		
		
		
		<u-popup
			:show="iswxshow" 
			:round="10" 
			customStyle="width:70%;" 
			overlayOpacity="0.8"
			mode="center"
			:closeable="true" 
			@close="closewx" 
			@open="openwx"
			:safeAreaInsetBottom="false"
			>
			<view class="wx-showinfo dis-clm">
				<view class="wxshow-title">温馨提示</view>
				<view class="wxshow-info">
					添加工友微信号workerhome，请在微信-添加朋友-搜索框中粘贴并添加为好友，添加后会拉你进工友群
				</view>
				<view class="wxshow-btn" @click="copyweixin('workerhome')">复制并前往微信</view>
			</view>
			</u-popup>
	</view>
</template>
<script>
	import uTabbarinfo from "@/components/uTabbar/uTabbarInfo.vue";
	import store from '@/common/store.js'
	import Index from '@/common/index-model.js'
	let index=new Index();
	export default {
		data() {
			return {
				workershow:false, // 企业发布的信息列表显示
				workerListRow:[],
				iswxshow:false, //是否显示微信号码
				telTips: false,
				fraction: false,
				userJob: false,
				horizontal: 'right',
				vertical: 'bottoms',
				search: "",
				advimgsrc: "http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/release.svg",
				list1: [],
				list2: [],
				current: -1,
				lTab: 0,
				orderinfo:{},
				oid:'',
				isguanzhu:false,
				issc:false,
				toporderlist:[],
				userListOrder:[],//发布用户的列表
				markers: [{
					id:1,
					latitude: 39.909,
					longitude: 116.39742,
					width:18,
					height:18,
					iconPath: '../../static/img/jmap.png'
				}],
				strmap:null,
				isshowmap:false,
				myUserid:uni.getStorageSync('userid'),
				pagesNum:0,
			};
		},
		components:{
			uTabbarinfo
		},
		onLoad(opt) {
			console.log("opt===============",opt);
			console.log("========0",uni.getStorageSync('userid'),'用户id');
			let q=opt.q;
			if(q){
				console.log("q===============1",q);
				q=decodeURIComponent(q);
				q=index.UrlParamHash(q);	
				console.log("q===============2",q);
				uni.setStorageSync('shareUserId',q.userid);
				this.oid=q.id;
			}else{
				console.log("q===============1",q);
				uni.setStorageSync('shareUserId',opt.userid);
				this.oid=opt.id;
			}
			this.strmap=uni.createMapContext('map',this);
			
			var pages    = getCurrentPages();
			this.pagesNum = pages.length - 2;
			
		},
		onShow() {
			// if(!uni.getStorageSync('token')){
			// 	let url="../../pagesC/login/login?urladd=jobinfo&id="+this.oid
			// 	index.navigate_to(url)
			// 	return false
			// }
			this.getOrderInfo()
			this.getTopOrderList()
			
		},
		onPullDownRefresh() {
			setTimeout(function () {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		methods: {
			timesNesd(time) {
				var times = Date.parse(new Date(time));
				let dd = new Date()
				let rands = (dd.getTime()-times) / (1000*3600*24)
				if(rands<2) {
					return '刚刚发布'
				}else{
					var date = new Date(time);
					var y = date.getFullYear();
					var m = date.getMonth() + 1;
					var d = date.getDate();
					var h = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
					var minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
					var s = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
					return y+'-'+m+'-'+d
				}
			},
			navIndex() {
				if(this.pagesNum<0){
					index.switch_tab('/pages/index/index')
				}else{
					index.navigate_back();
				}
			},
			weixinshares(url) {
				//index.navigate_to(url)
			},
			//复制微信号
			copyweixin(text) {
				uni.setClipboardData({
				  data:text,//要被复制的内容
				  success:()=>{//复制成功的回调函数
					uni.showToast({//提示
					  title:'复制成功',
					  icon:'success'
					})
				  }
				},true);
			},
			//获取企业发布的信息列表
			getWorkListRow() {
				if(this.orderinfo.isEnterprice == 1 && this.orderinfo.enidentity){
					let url="client/job/select/orders/"+this.orderinfo.enidentity
					let arr= [],welfares=[]
					this.listrow = []
					index.getPublicUserMember({},url,'get',res=>{
						console.log(res,'企业信息');
						if(res.data.code == 200 && res.data.success){
							arr = res.data.result
							for(let i=0;i<arr.length;i++){
								console.log(arr[i]);
							    arr[i].titleName = arr[i].address+'招'+arr[i].skills  //拼接地址+技能 = 列表标题
								if(arr[i].welfare){
									welfares=arr[i].welfare.split(',');
									for(let i=0;i<welfares.length;i++){
										if(welfares[i] == ''){
											welfares.splice(i,1)
										}
									}
									arr[i].welfareNew = welfares;
									//arr[i].welfareNew = arr[i].welfare.split(',')
								}else{
									arr[i].welfareNew = []
								}
								
								this.workerListRow.push(arr[i])
							}
						}else{
							this.workerListRow = []
						}
					})
				}else{
					this.workerListRow = []
				}
			},
			openwx() {
				this.iswxshow = true
				this.isshowmap = true
			},
			closewx(){
				this.iswxshow = false
				this.isshowmap = false
			},
			addweixin() {
				this.iswxshow = true
				this.isshowmap = true
			},
			openLoation(lat,lon,address) {
				console.log(lat,lon)
				this.strmap.openMapApp({
					latitude:Number(lat),
					longitude:Number(lon),
					destination:address,
					success: (res) =>{
						//console.log(res,'====reee==')
					},
					fail: (err)=>{
						//console.log(err,'====err==')
					}
				})
			},
			//查询发布的信息条数
			exclusive() {
				let send={
					"userId":this.orderinfo.userId
				}
				let url="client/job/find/orders/" + this.orderinfo.userId
				this.userListOrder = []
				index.getPublicUserMember({},url,'get',res=>{
					if(res.data.code == 200 && res.data.success){
						 let arr = res.data.result
						for(let i=0;i<arr.length;i++){
							arr[i].titleName = arr[i].address+'招'+arr[i].skills  //拼接地址+技能 = 列表标题
						   if(arr[i].welfare){
						   	arr[i].welfareNew = arr[i].welfare.split(',')
						   }else{
						   	arr[i].welfareNew=[]
						   }
						   this.userListOrder.push(arr[i])	
						}
					}else{
						this.userListOrder = []
					}
				})
			},
		  navUserOrderInfo(item) {
				let url="./index?id=" + item.id
				  index.redirectto(url) 
		   },
		   NavTaskInfo(item) {
			   //console.log(item,'====ttt====')
			   let url="./index?id=" + item.orderId
			  index.redirectto(url) 
		   },	
			//图片预览
			previewImg(v) {
				if(this.orderinfo.urlList.length>0){
					let imgs = this.orderinfo.urlList.map(item=>{
						return item.url
					})
					uni.previewImage({
						current: v,
						urls: imgs
					});
				}
			},
			//企业相关信息
			navComNew(value) {
				// let url = "../companyInfo/index"
				// index.navigate_to(url)
				// return false
				if(value == 'geren'){
					this.userJob = true
					this.isshowmap = true
				}else{
					// let url = "../companyInfo/index?enidentity="+this.orderinfo.enidentity
					// index.redirectto(url)
					this.workershow = true
					console.log(this.workerListRow);
				}
				return false
				//index.navigate_to(url)
			},
			qiyecloseJob() {
				this.workershow = false
			},
			qiyeopenJob() {
				this.workershow = true
			},
			//执行关注
			guanzhu() {
				let url="client/job/add/attention/"+this.orderinfo.orderId
				index.getPublicUserMember({},url,'post',res=>{
					if(res.data.code == 200 && res.data.success){
						index.show_tips('关注成功')
						this.isguanzhu = true
					}else{
						if(res.data.code =="100006" && res.data.success==false ){
							this.isguanzhu = true
							index.show_tips(res.data.message)
							return false
						}else{
							this.isguanzhu = false
							index.show_tips(res.data.message)
							return false
						}
					}
				})
			},
			//取消关注
			noguanzhu() {
				let url="client/job/del/attention/"+this.orderinfo.orderId
				index.getPublicUserMember({},url,'post',res=>{
					//console.log(res,'====vcvv===')
					if(res.data.code == 200 && res.data.success){
						index.show_tips('取消关注成功')
						this.isguanzhu = false
					}else{
						this.isguanzhu = true
						index.show_tips('您还未关注')
						return false
					}
				})
			},
			clickTabs({ index }) {
				this.current = index;
			},
			close() {
			    this.telTips = false;
			},
			open() {
			},
			closeFraction() {
			    this.fraction = false;
			},
			openFraction() {
			},
			closeJob() {
			    this.userJob = false;
				this.isshowmap = false
			},
			openJob() {
				this.isshowmap =true
			},
			btnClick() {
				
				// let url="../../pagesC/vipmember/vipuser"
				// index.navigate_to(url)
			},
			btnTouchstart() {},
			btnTouchend() {},
			showtelTips() {
				 this.telTips=true;             
			},
			showFraction() {
				 this.fraction=true;             
			},
			ShowUserJob(){
				this.fraction=true;
			},
			//获取详情
			getOrderInfo() {
				// console.log(orderid);
				let url="client/job/find/details/"+this.oid
				index.getPublicUserMember({},url,'get',res=>{
				console.log(res,'这个是一个活');
					let welfares =[]
					if(res.data.code == 200 && res.data.success){
						this.orderinfo = res.data.result;
						this.isguanzhu =(this.orderinfo.pay==1)?true:false
						welfares = res.data.result.welfare;
						if(welfares && welfares.length>0){
							welfares = index.strTrim(welfares,',');
							welfares = welfares.split(',');
						}
						this.orderinfo.welfares = welfares
						this.isguanzhu = this.orderinfo.pay==0?false:true
						
						let jobReqs = res.data.result.jobReq;
						if(jobReqs){
							jobReqs = index.strTrim(jobReqs,',');
							jobReqs = jobReqs.split(',');
						}
						this.orderinfo.jobReqs = jobReqs
						this.markers[0].latitude = res.data.result.lat?res.data.result.lat:0
						this.markers[0].longitude = res.data.result.lon?res.data.result.lon:0
						this.markers[0].customCallout= {
							        anchorY: 0, // Y轴偏移量
									anchorX: 0, // X轴偏移量
									display: 'ALWAYS' ,// 一直展示
									}
						this.markers[0].address = res.data.result.address			
                        this.exclusive()
						this.getWorkListRow()
					}else if(res.data.code == 401){
						let url="../../pagesC/login/login?urladd=jobinfo&id="+this.oid
						index.navigate_to(url)
						return false
					}else{
						index.show_tips('该好活已下线或不存在');
						setTimeout(()=>{
							index.navigate_back();
						},3000)
					}
				})
			},
			//获取详情页的列表信息
			getTopOrderList() {
				index.getPublicUserMember({},'/client/job/similar/'+this.oid,'get',res=>{
					if(res.data.code == 200 && res.data.success){
						let arr = res.data.result
						for(let i=0;i<arr.length;i++){
							arr[i].titleName = arr[i].address+'招'+ index.strTrim(arr[i].skills,',');   //拼接地址+技能 = 列表标题
							if(arr[i].welfare){
								arr[i].welfareNew = index.strTrim(arr[i].welfare,',').split(',');
							}else{
								arr[i].welfareNew = [];
							}
							this.toporderlist.push(arr[i]);
						}
					}else{
						this.toporderlist = []
					}
				})
			},
			cutstr(str, len) {
				var str_length = 0;
				var str_len = 0;
				var str_cut = new String();
				str_len = str.length;
				for (var i = 0; i < str_len; i++) {
					var a = str.charAt(i);
					str_length++;
					if (escape(a).length > 4) {
						//中文字符的长度经编码之后大于4  
						str_length++;
					}
					str_cut = str_cut.concat(a);
					if (str_length >= len) {
						str_cut = str_cut.concat("...");
						return str_cut;
					}
				}
				let reg=new RegExp(",","g"); //创建正则RegExp对象
				str=str.replace(reg,"、");
				//如果给定字符串小于指定长度，则返回源字符串；  
				if (str_length < len) {
					return str;
				}
			},
			strHandle(str,char=','){
				str=index.strTrim(str,char);
				return index.strRep(str,char,'、');
			}
		},
		onShareAppMessage(res) {
		    if (res.from === 'button') {// 来自页面内分享按钮
		    }
		    return {
				title: '【天下工人】'+this.orderinfo.title,
				path: '/pagesB/jobinfo/index?id='+this.orderinfo.orderId+'&userid='+uni.getStorageSync('userid'),
				imageUrl: 'http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230327160119.png'
		    }
		},
		onShareTimeline(res){
			return {
				title: '【天下工人】'+this.orderinfo.title,
				query: '/pagesB/jobinfo/index?id='+this.orderinfo.orderId+'&userid='+uni.getStorageSync('userid'),
				imageUrl: 'http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230327160119.png'
			}
		}
	}
</script>
<style>
	page{
		background: #f3f3f3;
	}
</style>
<style lang="scss" scoped>
@import url("index.css");
@import url("@/static/css/publics.css");

::v-deep {
  .u-navbar--fixed {	  
	  background: #fff;
    // background-image: linear-gradient(to bottom, #42cdff, #0288ff);
    & > view {
      background: transparent !important;
    }
    .leftText {
      color: #000;
    }
  }
}

.customCallout {
	font-size: 24rpx;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.5);
	// box-shadow: 0px 4rpx 16px 0px rgba(189, 191, 193, 0.4);
	border-radius: 4rpx;
	display: inline-flex;
	color: #fff;
	min-width: 710rpx;
	margin-top: 220rpx;
	// padding: 25rpx 0rpx 25rpx 0rpx;
	// height: 80rpx;
	// line-height: 80rpx;
}
.marktop{padding: 0rpx 20rpx;}
// .sanjiao{
// 	  width: 0;
// 	  height: 0;
// 	  border-left: 10rpx solid transparent;
// 	  border-top: 10rpx solid transparent;
// 	  border-right: 16rpx solid rgba(255, 255, 255, 0.75);
// 	  border-bottom: 4rpx solid rgba(255, 255, 255, 0.75);
// }
.telTips{ padding: 32rpx 40rpx 20rpx 20rpx; text-align: center;
	image{
		width: 48rpx;
		height: 48rpx;
		margin-bottom: 16rpx;
	}
	view:nth-child(2){
		font-size: 36rpx!important;
		margin-bottom: 16rpx;
		font-weight: 500;
	}
	view:nth-child(3){
		font-size: 28rpx!important;
		font-weight: 100;
	}
}

.fraction{
	padding: 32rpx 40rpx 20rpx 20rpx;
	text-align: left;
	image{
		width: 96rpx;
		height: 96rpx;
	}
	view:nth-child(2){
		font-size: 36rpx;
		margin-bottom: 48rpx;
	}
}

.userJobList{
	padding: 32rpx 20rpx;
	.scroll-Y {
		margin-top: 52rpx;
		max-height: 60vh;
	}
	.top{
		.user{
			display: flex;
			margin-bottom: 12rpx;
			image{
				width: 28rpx;
				height: 28rpx;
			}
			view{
				line-height: 32rpx;
				margin-left: 16rpx;
				font-size: 32rpx;
			}
		}
		.number{
			margin-left: 45rpx;
			color: #3D3D3D;
			font-size: 24rpx;
			text{
				color: #0575FF;
				margin-left: 8rpx;
			}
		}
	}
	.complist{
		// background-image: url('http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/comp-bg.png');
		background-repeat: no-repeat;
		background-position: bottom left;
	}
	.list {
	  padding: 0rpx 0rpx 0;
	  margin-bottom: 20rpx;
	  .title {
	    display: flex;
	    align-items: center;
	    text {
	      background: #ff5964;
	      color: #fff;
	      font-size: 20rpx;
	      padding: 8rpx 14rpx;
	      border-radius: 8rpx;
	    }
	    view {
	      font-size: 36rpx;
	      font-weight: bold;
	      // margin-left: 20rpx;
	    }
	  }
	  .cont {
	    margin: 20rpx 0;
	    font-size: 24rpx;
	    color: #424242;
	  }
	  .tag {
	    display: flex;
		flex-wrap: wrap;
	    view {
	      background: #f7f7f7;
	      border-radius: 8rpx;
	      font-size: 28rpx;
	      padding: 5rpx 10rpx;
	      margin-right: 10rpx;
	      color: #424242;
		  margin-bottom: 10rpx;
	    }
	    .t1 {
	      color: #ff5964;
	    }
	  }
	  .info {
	    padding-top: 20rpx;
	    padding-bottom: 30rpx;
	    margin-top: 20rpx;
	    align-items: baseline;
	    border-top: 0.5px solid #f0f0f0;
	    display: flex;
	    justify-content: space-between;
	    .left {
	      .top {
	        display: flex;
	        align-items: center;
	        .name {
	          color: #0f0f0f;
	          font-weight: bold;
	        }
	        image {
	          width: 28rpx;
	          height: 28rpx;
			  margin-left: 14rpx;
			  margin-right: 10rpx;
	        }
	        .authMe {
	          color: #a1a1a1;
	          font-size: 24rpx;
	        }
			.comp {
			  color: #d9a14e;
			  font-size: 24rpx;
			}
	      }
	      .addr {
	        display: flex;
	        color: #a1a1a1;
	        font-size: 24rpx;
	        margin-top: 10rpx;
	        ::v-deep {
	          .u-icon {
	            margin-right: 14rpx;
	          }
	        }
	      }
	    }
	    .right {
	      color: #0575FF;
		  font-size: 24rpx;
		  font-weight: 100rpx;
	    }
	  }
	}
}

.content{
	
}
.center{
	padding: 20rpx 0rpx 0rpx 0rpx;
	background: #fff;
}
.contacts{ 
	background-image: linear-gradient(to bottom, #CBE2FF, #EEF6FF);
	border-radius: 16rpx;
	height: 124rpx;
	padding: 32rpx 20rpx;
	.info {
		align-items: baseline;
		.top {
			align-items: center;
			overflow: hidden;
			width: 100%;
			.contacts_name{
				float: left;
				display: flex;
				.name {
					color: #0f0f0f;
					font-weight: bold;
				}
				image {
					width: 28rpx;
					height: 28rpx;
					margin-left: 14rpx;
					margin-right: 10rpx;
					margin-top: 16rpx;
				}
				.authMe {
					color: #a1a1a1;
					font-size: 24rpx;
					line-height: 60rpx;
				}
				.comp {
					color: #d9a14e;
					font-size: 24rpx;
				}
			}
			.follow{
				float: right;
				border: 1px solid #0575FF;
				background: #fff;
				color: #0575FF;
				border-radius: 30rpx;
				height: 48rpx;
				line-height: 48rpx;
				width: 144rpx;
				text-align: center;
			}
		}
		.addr {
			color: #A1A1A1;
			font-size: 24rpx;
			margin-top: 20rpx;
			overflow: hidden;
			view:nth-child(1){
				display: flex;
				float: left;
				font-size: 24rpx;
				::v-deep {
					.u-icon {
						margin-right: 14rpx;
					}
				}
			}
			view:nth-child(2){
				float: right;
				font-size: 24rpx;
			}
		}
	}
}

.jobinfo{
	.title {
		display: flex;
		align-items: center;
		flex-direction: row;
		margin-top: 32rpx;
		margin-bottom: 32rpx;
		text {
			// background: #ff5964;
			// color: #fff;
			// font-size: 20rpx;
			// padding: 8rpx 14rpx;
			// border-radius: 8rpx;
			  display: inline-block;
			  background: #ff5964;height: 38rpx;line-height: 38rpx;text-align: center;
			  position: absolute;left: 0rpx;top: 12rpx;
			  color: #fff;
			  width: 64rpx;
			  font-size: 20rpx;
			  // padding: 4rpx 10rpx;
			  border-radius: 8rpx;
			  // margin-right: 20rpx;
		}
		view {
			font-size: 36rpx;
			font-weight: bold;
		}
	}
	.tag {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		view {
			background: #E4F0FF;
			border-radius: 8rpx;
			font-size: 28rpx;
			padding: 10rpx;
			margin-right: 10rpx;
			color: #424242;
		}
		.t1 {
			color: #ff5964;
		}
	}
	.work_type {
		align-items: baseline;
		background: #E4F0FF;
		margin-top: 32rpx;
		padding: 20rpx;
		.top {
			align-items: center;
			overflow: hidden;
			width: 100%;
			.work_type_name{
				float: left;
				display: flex;
				view:nth-child(1) {
					color: #424242;
					font-weight: bold;
					height: 40rpx;
					line-height: 40rpx;
				}
				view:nth-child(2) {
					color: #FFFFFF;
					font-weight: bold;
					background: #0575FF;
					height: 40rpx;
					line-height: 40rpx;
					width: 72rpx;
					border-radius: 6rpx;
					text-align: center;
					margin-left: 16rpx;
				}
			}
			.status{
				float: right;
				color: #FF5964;
				font-weight: bold;
				height: 40rpx;
				line-height: 40rpx;
			}
		}
		.bottom {
			color: #A1A1A1;
			font-size: 24rpx;
			margin-top: 20rpx;
			// overflow: hidden;
			display: flex;
			view{
				display: inline-block;
				padding: 0 6rpx;
				border-left: 1px solid #A1A1A1;
				height: 30rpx;
				line-height: 30rpx;
			}
			.t1{
				color: #FF5964;
			}
			view:first-child{
				padding-left: 0;
				border: none;
			}
		}
	}
	.jobintroduction{
		.title{
			font-size: 32rpx;
			color: #3D3D3D;
			margin-bottom: 20rpx;
		}
		.tag{
			display: flex;
			view {
				background: #F7F7F7;
				border-radius: 6rpx;
				font-size: 28rpx;
				padding: 10rpx;
				margin-right: 10rpx;
				color: #424242;
			}
		}
		.xinzei{
			color: #424242;
			margin-top: 20rpx;
		}
		.contents{
			color: #424242;
			margin-top: 20rpx;
		}
		.imageslist{
			display: flex;
			margin-top: 20rpx;
			padding-bottom: 20rpx;
			border-bottom: 1rpx solid #F0F0F0;
			view{
				width: calc(25% - 16rpx);
				margin-right: 16rpx;
				height: 200rpx;
				overflow: hidden;
				image{
					height: 100%;
					width: 100%;
				}
			}
			
		}
		.company{
			overflow: hidden;
			margin: 20rpx 0rpx;
			.title{
				display: block;
				float: left;
				width: 100%;
				image{
					width: 32rpx;
					height: 32rpx;
					float: left;
					margin-top: 10rpx;
				}
				.name{
					float: left;
					margin: 0rpx;
					font-size: 32rpx;
					margin-left: 10rpx;
					font-weight: 500;
					color: #3D3D3D;
					view{
						font-size: 24rpx;
						font-weight: 100;
						margin-left: 0;
						color: #3D3D3D;
						text{
							color: #0575FF;
							background: none;
							padding: 0;
							display: inline-block;
						}
					}
				}
				
			}
			.right{ 
				float: right;
				margin-top: 30rpx;
				right: 4rpx;
				image{
					width: 32rpx;
					height: 32rpx;
				}
			}
			.map{ clear: both;
				height: 264rpx;
				line-height: 264rpx;
				text-align: center;
				background: #E4F0FF;
				border-radius: 10rpx;
				margin-bottom: 32rpx;
			}
		}
		.contact_comp{
			overflow: hidden;
			display: flex;
			justify-content: space-around;
			.left{
				flex: 1;
				background: #E4F0FF;
				border-radius: 16rpx;
				margin-right: 22rpx;
				padding: 18rpx;
				color: #0F0F0F;
				background-image: url("");
				background-position: 120rpx 40rpx;
				background-repeat: no-repeat;
				background-size: 260rpx 180rpx;
				view:nth-child(1){
					font-weight: bold;
					margin-bottom: 22rpx;
					height: 96rpx;
					line-height: 48rpx;
				}
				view:nth-child(2){
					font-weight: 100;
					background: #0575FF;
					width: 128rpx;
					height: 48rpx;
					text-align: center;
					color: #FFFFFF;
					border-radius: 6rpx;
				}
			}
			.right{
				flex: 1;
				background: #E4F0FF;
				border-radius: 16rpx;
				padding: 18rpx;
				color: #0F0F0F;
				background-image: url("");
				background-position: 95% 90%;
				background-repeat: no-repeat;
				background-size: 94rpx 94rpx;
				view:nth-child(1){
					font-weight: bold;
					margin-bottom: 22rpx;
					height: 96rpx;
					line-height: 48rpx;
				}
				view:nth-child(2){
					font-weight: 100;
					border: 1rpx solid #0575FF;
					width: 128rpx;
					height: 48rpx;
					text-align: center;
					color: #0575FF;
					border-radius: 6rpx;
				}
			}
		}
		
	}
}
.securityTips{
			margin: 30rpx 0rpx 10rpx 0rpx;
			padding: 15rpx 20rpx 15rpx 20rpx;
			background-color: #F8FAFF;
			image{
				width: 48rpx;
				height: 48rpx;
				display: block;
				margin-right: 10rpx;
			}
			view:nth-child(1){
				margin-right: 10rpx;
			}
			view:nth-child(2){
				margin-right: 20rpx;
				font-size: 28rpx;
				width: 120rpx;
			}
			view:nth-child(3){
				color: #A1A1A1;
				margin-right: 10rpx;
				font-size: 28rpx;
			}
		}
		.similar{ color: #A1A1A1; font-size: 32rpx; padding-bottom: 26rpx;}
.index {
	padding-bottom: 140rpx;
	.complist{
		background-image: url('')!important;
		background-repeat: no-repeat!important;
		background-position: bottom left!important;
	}
    .list {
      padding: 20rpx 20rpx 0;
	  background: #fff;
	  margin-top: 20rpx;
  //     .title {
  //       display: flex;
		// flex-direction: row;
  //       align-items: center;
  //       text {
  //         background: #ff5964;
  //         color: #fff;
  //         font-size: 20rpx;
  //         padding: 8rpx 14rpx;
  //         border-radius: 8rpx;
  //       }
  //       view {
  //         font-size: 36rpx;
  //         font-weight: bold;
  //         margin-left: 20rpx;
  //       }
  //     }
  .title {
          display: flex;
  		flex-direction: row;
          // align-items: center;
          text {
  			display: inline-block;
            background: #ff5964;height: 38rpx;line-height: 38rpx;text-align: center;
  		  position: absolute;left: 0rpx;top: 8rpx;
            color: #fff;
  		  width: 64rpx;
            font-size: 20rpx;
            // padding: 4rpx 10rpx;
            border-radius: 8rpx;
  		  margin-right: 20rpx;
          }
          view {
  			font-size: 36rpx;
  			font-weight: bold;
          }
	  }
      .cont {
        margin: 20rpx 0;
        font-size: 24rpx;
        color: #424242;
      }
      .tag {
        display: flex;
		flex-wrap: wrap;
        view {
          background: #f7f7f7;
          border-radius: 8rpx;
          font-size: 28rpx;
          padding: 10rpx;
          margin-right: 10rpx;
          color: #424242;
		  margin-bottom: 10rpx;
        }
        .t1 {
          color: #ff5964;
        }
      }
      .info {
        padding-top: 20rpx;
        padding-bottom: 30rpx;
        margin-top: 20rpx;
        align-items: baseline;
        border-top: 0.5px solid #f0f0f0;
        display: flex;
        justify-content: space-between;
        .left {
          .top {
            display: flex;
            align-items: center;
            .name {
              color: #0f0f0f;
              font-weight: bold;
            }
            image {
              width: 28rpx;
              height: 28rpx;
			  margin-left: 14rpx;
			  margin-right: 10rpx;
            }
            .authMe {
              color: #a1a1a1;
              font-size: 24rpx;
            }
			.comp {
			  color: #d9a14e;
			  font-size: 24rpx;
			}
          }
          .addr {
            display: flex;
            color: #a1a1a1;
            font-size: 24rpx;
            margin-top: 10rpx;
            ::v-deep {
              .u-icon {
                margin-right: 14rpx;
              }
            }
          }
        }
        .right {
          display: flex;
          flex-direction: column;
          align-items: flex-end;
          .t1 {
            background: #ddffd5;
            color: #424242;
            font-size: 24rpx;
            border-radius: 24rpx;
            padding: 2rpx 10rpx;
          }
		  .t2 {
		    background: #E4F0FF;
		    color: #424242;
		    font-size: 24rpx;
		    border-radius: 24rpx;
		    padding: 2rpx 10rpx;
		  }
          .btn {
            height: 60rpx;
            line-height: 60rpx;
            width: 140rpx;
            text-align: center;
            color: #fff;
            border-radius: 8rpx;
            background: #0575ff;
            font-size: 28rpx;
          }
        }
      }
  }
}
</style>